package expression;

/**
 * 加法算式子类 - 实验内容2
 * 编写加法算式子类
 */
public class AddExpression extends Expression {
    public AddExpression(int left, int right) {
        super(left, right);
    }
    
    @Override
    public int calculate() {
        return left + right;
    }
    
    @Override
    public String getOperator() {
        return "+";
    }
}